package com.mate.cloud.sensitive.config;


import com.mate.cloud.sensitive.format.CommonDesensitize;
import com.mate.cloud.sensitive.handler.SecurityHandler;
import com.mate.cloud.sensitive.handler.SensitiveHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: 脱敏配置类
 * @author: MI
 * @email: 448341911@qq.com
 * @createTime: 2025/2/11 17:21
 * @updateUser: MI
 * @updateTime: 2025/2/11 17:21
 * @updateRemark: 修改内容
 * @version: v1.0
 */
@Slf4j
@Configuration
public class SensitiveAutoConfiguration extends AbstractConfiguration {

    public SensitiveAutoConfiguration(SensitiveConfigProperties configProperties) {
        super(configProperties);
    }

    @Bean
    public SecurityHandler sensitiveHandler() {
        SensitiveHandler sensitiveHandler=new SensitiveHandler();
        sensitiveHandler.setDesensitize(new CommonDesensitize());
        return sensitiveHandler;
    }
}
